/**
   \file  settings.hh
   \brief Various global libgist settings.

   This file defines an API that encapsulates various global settings
   applicable to all the algorithms available in libgist, e.g., the
   number of threads to use for training.
*/

/*
   This file is part of libgist.

   libgist is free software; you can redistribute it and/or modify it
   under the terms of the GNU General Public License as published by the
   Free Software Foundation; either version 2 of the License, or (at your
   option) any later version.

   libgist is distributed in the hope that it will be useful, but WITHOUT
   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
   FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
   for more details.

   You should have received a copy of the GNU General Public License
   along with libgist; if not, write to the Free Software Foundation,
   Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/

/*
   REVISION HISTORY

   $HeadURL: http://libgist.googlecode.com/svn/branches/wu_dev/src/settings.hh $
   $Id: settings.hh 71 2011-09-29 06:22:25Z libgist@gmail.com $
*/

#ifndef LIBGIST_SETTINGS_DOT_HH
#define LIBGIST_SETTINGS_DOT_HH

//----------------------- NAMESPACE DEFINITION --------------------------

namespace gist {

//--------------------------- SETTINGS API ------------------------------

/**
   \brief How many threads to use when things can be parallelized?
   \param n Number of threads to use.

   Often, various steps in a scene categorization algorithm can be run in
   parallel. libgist is implemented to take advantage of such parallel
   processing opportunities. The default setting, however, is to use a
   single thread. But when multiple processors are available,
   parallelizing parallelizable operations can provide a significant
   performance boost and client functions/modules/programs should set the
   number of threads to more than one (the optimal number will depend on
   how many processors are available, whether the underlying platform
   provides support for hyperthreading, and so on; clients should be able
   to glean this information from the operating system).

   This function sets the number of threads libgist should use.
*/
void num_threads(int n) ;

/**
   \brief  How many threads should libgist use?
   \return Number of threads libgist is currently setup to use.

   As mentioned earlier, libgist is implemented to take advantage of
   parallel processing opportnities wherever possible. By default,
   however, it uses only one thread. But when multiple processors are
   available, clients can setup libgist to use more than one thread so as
   to boost performance.

   This function returns the number of threads libgist is currently
   configured to use.
*/
int num_threads() ;

//-----------------------------------------------------------------------

} // end of namespace encapsulating this file's definitions

#endif

/* So things look consistent in everyone's emacs... */
/* Local Variables: */
/* indent-tabs-mode: nil */
/* End: */

